SftTree/OCX 7.0

SftPictureObject.SetImage Method

Softel vdm, Inc.

Defines the picture object attributes defined as a GDI+ image.

Syntax       

VB.NET

object.SetImage(ByVal GDIPlusImage As Integer, ByVal Owned As Boolean)

VB

object.SetImage(ByVal GDIPlusImage As LONG_PTR, ByVal Owned As Boolean)

C#.NET

void object.SetImage(int GDIPlusImage, bool Owned);

VC++

HRESULT object->SetImage(LONG_PTR GDIPlusImage, VARIANT_BOOL Owned);

C

HRESULT object->raw_SetImage(LONG_PTR GDIPlusImage, VARIANT_BOOL Owned);

Delphi

procedure object.SetImage(GDIPlusImage : Pointer, Owned : WordBool);

object

A SftPictureObject object.

GDIPlusImage

A pointer to a Gdiplus::Image object.

Owned

Set to True if the GDI+ image is owned by the tree control, False otherwise.

Comments

The SetImage method defines the picture object attributes defined as a GDI+ image.

The SetImage property offers support for PNG, TIFF, JPEG, GIF, Exif, EMF+, EMF (GDI+ images) with full support for alpha-blended (translucent and semi-transparent) images.

If Owned is set to False, the image remains owned by the application and must remain valid as long as it is used by the tree control. Once it is no longer needed, it must be deleted by the application. Most languages, except C++, automatically delete the object when it is no longer needed so no action is usually necessary.

If Owned is set to True, the tree control automatically deletes the image object when it is no longer needed.

The SftPictureObject.Type property is set to sftTypeGDIPlus. The SftPictureObject.ActualHeight and SftPictureObject.ActualWidth properties reflect the image size.

The Image property can also to define the image object using a GDI+ image, but it does not assign ownership of the GDI+ image to the tree control. SetImage(image, False) is identical to the use of the Image property.

See Also  SftPictureObject Object | Object Hierarchy


Feedback / comments / error reports for this topic
© 2015 - Softel vdm, Inc. - www.softelvdm.com